﻿
using FreeSql;
using ExceptionDataStatisticsService.Service;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Msung.Core;
using Msung.Core.Caching;
using Msung.Core.Model;
using Msung.Repository.Entity;
using Msung.Repository.IRepository;
using Quartz;
using StackExchange.Redis;
using System;
using System.Runtime.CompilerServices;
using System.Text;
using static System.Formats.Asn1.AsnWriter;

namespace IcIntegration.Job.Jobs
{
    public class SeJobService : IJob
    {
        private readonly ILogger _logger;
        private readonly IServiceProvider _serviceProvider;

        public SeJobService(
            IServiceProvider serviceProvider,
            ILogger<SeJobService> logger)
        {
            _logger = logger;
            _serviceProvider = serviceProvider;
        }

        public async Task Execute(IJobExecutionContext context)
        {
            ExceptionDataService exceptionDataService = new ExceptionDataService(_serviceProvider, _logger);

            string[] equipmentList = new string[] { "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133" };
            exceptionDataService.ExceptionDataStatistics(this.GetType().Name, equipmentList);
        }
    }
}

